package org.example.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import jdk.internal.org.objectweb.asm.tree.analysis.Value;
import org.example.MonitorBlockHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController

public class MonitorController {
@GetMapping("/monitor/hello")
@SentinelResource(value = "helloResource",blockHandler = "helloBlockHandeler",blockHandlerClass = MonitorBlockHandler.class)


public String hello() {
    return "hello,sentinel";
}

}